#include <iostream>
#include <string>
using namespace std;

int main()
{
	string str;
	cin >> str;
	int l = str.length();
	if (str[l - 2] == 'l' && str[l - 1] == 'y' || str[l - 2] == 'e' && str[l - 1] == 'r')
		cout << str.erase(l - 2, 2);
	else if (str[l - 3] == 'i' && str[l - 2] == 'n' && str[l - 1] == 'g')
		cout << str.erase(l - 3, 3);
	else
		cout << str;
	return 0;
}